﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SubmitOrder.aspx.cs" Inherits="WeChat.MenuReservation.SubmitOrder" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
    <title>提交订单</title>
    <script src="../Script/rem.js"></script> 
    <script src="../Script/jquery.min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="../css/base.css"/>
    <link rel="stylesheet" type="text/css" href="../css/page.css"/>
    <link rel="stylesheet" type="text/css" href="../css/all.css"/>
    <link rel="stylesheet" type="text/css" href="../css/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../css/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="../css/loading.css"/>
    <link href="../Script/slick/slick.css" rel="stylesheet" />
<script type="text/javascript">
	$(window).load(function(){
		$(".loading").addClass("loader-chanage")
		$(".loading").fadeOut(300)
	})
	$(function () {
	  
	    function getUrlParam(price) {
	        var reg = new RegExp("(^|&)" + price + "=([^&]*)(&|$)"); 
	        var r = window.location.search.substr(1).match(reg); 
	        if (r != null) return unescape(r[2]); return null;
	    }
	    $("#sum").html(getUrlParam('price'));
	    $("#orderid").html(getUrlParam('OrderID'));
    });
    function submit() {
        if ($('#wx input:radio[name="sex"]:checked').val() != null)
        {
            alert("微信支付");
        }
        else if ($('#ye input:radio[name="sex"]:checked').val()!=null)
        {
            var sum = $("#sum").text();
             $.ajax({
	        type: "post",
	        url: "../MenuReserveHandler.ashx",
            data: { price: sum, funcName: 'yePay' },
	        dataType: 'json',
	        success: function (data) {
	            $("#orderid").text(data);
	        },
	        error: function () {
	            alert("异常！");
	        }
	    });
        }
    }
</script>
</head>
    <!--loading页开始-->
<div class="loading">
	<div class="loader">
        <div class="loader-inner pacman">
          <div></div>
          <div></div>
          <div></div>
          <div></div>
          <div></div>
        </div>
	</div>
</div>
<!--loading页结束-->
<body>
		<header class="mui-bar mui-bar-nav report-header box-s" id="header">
			<a href="javascript:history.go(-1)"><i class="iconfont icon-fanhui fl"></i></a>
			<p>提交订单</p>
	    </header>
	    <div id="main" class="mui-clearfix contaniner sorder">	    	
	    	<div class="warning clearfloat box-s">
    			提示：请在24小时内完成在线支付，逾期将视为订单无效
    		</div>
    		<div class="odernum clearfloat">
    			<ul>
    				<li >您的订单号：<span id="orderid" style="color:black"></span></li>
    				<li>应付金额：<span id="sum"></span></li>
    			</ul>
    		</div>
    		<div class="pay-method clearfloat">
    			<ul>
    				<li>请选择支付方式</li>
    			</ul>
    		</div>
	    	<div class="addlist clearfloat">
	    		<div class="bottom clearfloat box-s">
	    			<section class="shopcar clearfloat">
						<div class="radio radiosss fr"> 
						    <label  id="wx">
						        <input type="radio" name="sex" value="" >
						        <div class="option"></div>
						    </label>
						</div>
						<div class="sorder-list clearfloat fl">
							<i class="iconfont icon-weixinzhifu fl"></i>
							<div class="zuo fl">
								<p class="tit">微信支付</p>
								<p class="fu-tit">亿万用户的选择，更快更安全</p>
							</div>							
						</div>
					</section>
	    		</div>
	    		<div class="bottom clearfloat box-s">
	    			<section class="shopcar clearfloat">
						<div class="radio radiosss fr" > 
						    <label id="ye">
						        <input type="radio" name="sex" value="" >
						        <div class="option"></div>
						    </label>
						</div>
						<div class="sorder-list clearfloat fl">
							<i class="iconfont icon-yinxingqia fl"></i>
							<div class="zuo fl">
								<p class="tit">卡内余额</p>
								<p class="fu-tit">卡内余额直接支付，方便快捷！</p>
							</div>							
						</div>
					</section>
	    		</div>
	    	</div>
	    	<a href="#" class="address-add fl" onclick="submit()">
	     		确认支付
	     	</a>
	    </div>
	    
	</body>
	<script type="text/javascript" src="../Script/jquery-1.8.3.min.js" ></script>
	<script src="../Script/fastclick.js"></script>
	<script src="../Script/mui.min.js"></script>
	<script type="text/javascript" src="../Script/hmt.js" ></script>
	<script type="text/javascript">
        //debugger
        //$(".shopcar-checkbox label").on('touchstart', function () {
        //    if ($(this).hasClass('shopcar-checkd')) {
        //        $(".shopcar-checkbox label").removeClass("shopcar-checkd")
        //    } else {
        //        $(".shopcar-checkbox label").addClass("shopcar-checkd")
        //    }
        //})
	</script>
</html>
